Skip to content

[NFC] Cleanup typed pointer holdovers in clang-offload-wrapper #19370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025

Conversation

ldrumm
Copy link
Contributor

@ldrumm ldrumm commented Jul 9, 2025

The overload llvm::PointerType::getUnqual(ElementTy *) is now simply a wrapper around llvm::PointerType::getUnqual(Context &) i.e.

PointerType *llvm::PointerType::getUnqual(ElementTy *E) {
  return getUnqual(E->getContext());
}

(ignoring the attributes that raised the deprecation warning in the first place)

Since there's no longer a possible distinction between the returned types, we can get rid of all the typed getters and simply cache the unqualified opaque pointer type on first use.

@ldrumm ldrumm requested a review from a team as a code owner July 9, 2025 15:27
@ldrumm ldrumm force-pushed the no-typed-ptrs-no-more branch from ad6df41 to 70459b6 Compare July 9, 2025 15:28
The overload llvm::PointerType::getUnqual(ElementTy *) is now simply a
wrapper around `llvm::PointerType::getUnqual(Context &)` i.e.
PointerType *llvm::PointerType::getUnqual(ElementTy *E) {
  return getUnqual(E->getContext());
}

Since there's no longer a possible distinction between the returned
types, we can get rid of all the typed getters and simply cached the
unqualified opaque pointer type on first use.
@ldrumm ldrumm force-pushed the no-typed-ptrs-no-more branch from 70459b6 to f47c8c8 Compare July 9, 2025 16:16
@ldrumm ldrumm temporarily deployed to WindowsCILock July 9, 2025 16:16 — with GitHub Actions Inactive
@ldrumm ldrumm temporarily deployed to WindowsCILock July 9, 2025 17:11 — with GitHub Actions Inactive
@ldrumm ldrumm temporarily deployed to WindowsCILock July 9, 2025 17:11 — with GitHub Actions Inactive
Copy link
Contributor

@maksimsab maksimsab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add [NFC] specifier to PR title.

@ldrumm ldrumm changed the title Cleanup typed pointer holdovers in clang-offload-wrapper [NFC] Cleanup typed pointer holdovers in clang-offload-wrapper Jul 15, 2025
@ldrumm ldrumm merged commit 66909ed into intel:sycl Jul 15, 2025
25 checks passed
@ldrumm ldrumm deleted the no-typed-ptrs-no-more branch July 15, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants